﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CCPnuts.ISkyDiskFileSystem.Interfaces;
using CCPnuts.ISkyDiskFileSystem;

namespace TestSkyDiskFileSystem
{
    class SkyDisk : SkyElementContainer, I_SkyDisk, S_SkyDisk
    {
        public SkyDisk() : base(PackedInfos.SkyDisk) { }

        /// <summary>
        /// You can not move a SkyDisk.
        /// </summary>
        /// <param name="tarDir"></param>
        public override void MoveTo(I_SkyElementContainer tarDir)
        {
            throw new NotSupportedException("You Cann't Move a SkyDisk.");
        }

        #region S_SkyDisk Members

        public I_SkyDisk Login(string username, string password)
        {
            var disk =  new SkyDisk
            {
                Name = username,
                Parent = null
            };
            disk.Children = SkyElementCollection.Gene(disk, username);
            return disk;
        }

        #endregion
    }
}
